import jmespath


def jme(exp, data):
    return jmespath.search(exp, data)


def str_to_int(field):
    if field is not None:
        try:
            return int(field)
        except Exception as e:
            try:
                return float(field)
            except Exception as e:
                return field
    else:
        return ""
